CAAL | ACLA 2023¶

Identités professionnelles des enseignants de français langue seconde: perceptions d'éducatuers albertains. Auteures: Tina Leard, Sylvie Roy, Fanny Macé, et Aurélia Mir-Orefice.

In [1]:
import numpy as np
import pandas as pd
from pandas import read_csv
import plotly.express as px
import plotly.graph_objects as go
import pingouin as pg
from pingouin import power_corr
import warnings
warnings.filterwarnings("ignore")

Vallat, R. (2018). Pingouin: statistics in Python. Journal of Open Source Software, 3(31), 1026, https://doi.org/10.21105/joss.01026
Plotly Technologies Inc. Collaborative data science. Montréal, QC, 2015. https://plot.ly.

Teacher Datasets¶

In [2]:
trrDat = pd.read_csv("data/teachers-items.csv")
trrDat_program_1 = trrDat.replace(['Early FI, English language school with FSL'],'Early FI, FSL')
trrDat_program_2 = trrDat_program_1.replace(['English language school with FSL'],'FSL')
trrDat_program_3 = trrDat_program_2.replace(['English language school with FSL, Other'],'FSL, Other')
trrDat_program_4 = trrDat_program_3.replace(['FI and English language school with FSL'],'FI, FSL')  
trrDat_program_5 = trrDat_program_4.replace(['FI and French school'],'FI, French school')
trrDat_program_6 = trrDat_program_5.replace(['Early FI and French school'],'Early FI, French school')
trrDat_program_7 = trrDat_program_6.replace(['Late FI'],'FI')
trrDat_program_8 = trrDat_program_7.replace(['English and French'], 'English<br>and<br>French')
trrDat_program_9 = trrDat_program_8.replace(['French and English'], 'French<br>and<br>English')

Online Survey¶

In [3]:
df_short_to_long = pd.melt(trrDat, id_vars =['v1'], value_vars =(trrDat.loc[:, "item01" : "item50"]), var_name='Item', value_name='Scale')
df_ascending = df_short_to_long.sort_values(['v1','Item'])
df_items = df_ascending.rename(columns={'v1': 'Participant'})

Likert Scale¶

1 2 3 4 5
Tout à fait en désaccord En désaccord Ni en accord, ni en désaccord D'accord Tout à fait d'accord
Strongly disagree Disagree Neither agree nor disagree Agree Strongly agree

Total Frequences for Likert Scale¶

In [4]:
df_scores = df_items['Scale']
df_scores.value_counts()
Out[4]:
4    778
5    420
3    336
2    289
1    127
Name: Scale, dtype: int64

Likert Item Sequence per Participant¶

In [5]:
survey_participant = px.line(df_items, y='Scale', x='Item', color='Participant', color_discrete_sequence=px.colors.diverging.Portland)
survey_participant.show()

Likert Subscales¶

Preparedness Satisfaction Competence Confidence
items 1-13 items 14-23 items 24-36 items 37-50
When thinking about your first teaching position, you felt PREPARED because your BEd training included When thinking about your current teaching position, you feel SATISFIED thanks to When thinking about your current teaching position, you feel COMPETENT in When thinking about your current teaching position, you feel CONFIDENT because you receive support in
... ... ... ...
01 Assessment (FSL / Immersion / French [first language]) 14 Collaboration & communication with school team (direction, colleagues, parents and students) 24 Assessment (FSL / Immersion / French [first language]) 37 Assessment (FSL / Immersion / French [first language])
02 Classroom Management 15 Mentoring by experienced teachers 25 Classroom Management 38 Classroom Management
03 French Oral Skills 16 Participation in French-speaking communities & events 26 Collaboration & communication with school team (direction, colleagues, parents and students) 39 Collaboration & communication with school team (direction, colleagues, parents and students)
04 French Written Skills 17 Participation in French language training 27 Equity, Diversity & Inclusion (EDI) 40 Equity, Diversity & Inclusion (EDI)
05 Enough practicum (FSL / Immersion / French [first language] settings) 18 Salary 28 French Oral Skills 41 French language training
06 Experience in Canada or abroad (French language settings) 19 Sense of a school culture of excellence & social belonging 29 French Written Skills 42 French Oral Skills
07 Equity, Diversity & Inclusion (EDI) 20 Sense of belonging to French-speaking communities 30 Grade level(s) 43 French Written Skills
08 Grade level(s) taught 21 Vacation 31 Indigenous perspectives 44 Grade level(s) taught
09 Indigenous perspectives 22 Well-being 32 Lesson planning 45 Indigenous perspectives
10 Lesson planning 23 Workload & Administrative duties 33 Pedagogy (FSL / Immersion / French [first language]) 46 Lesson planning
11 Pedagogy (FSL / Immersion / French [first language]) 34 Subjects taught 47 Pedagogy (FSL / Immersion / French [first language])
12 Subjects taught 35 Technology 48 Subjects taught
13 Technology 36 Workload & Administrative duties 49 Technology
50 Workload & Administrative duties

Crosstabulation of Items¶

In [6]:
cross = pd.crosstab(df_items['Item'], df_items['Scale'], colnames=['Item'], rownames=['Scale'], margins=True, margins_name="Total") # normalize='all' for percentages
cross
Out[6]:
Item 1 2 3 4 5 Total
Scale
item01 6 7 7 17 2 39
item02 3 8 10 14 4 39
item03 6 3 4 13 13 39
item04 8 3 3 11 14 39
item05 5 7 2 14 11 39
item06 5 4 10 14 6 39
item07 2 9 10 13 5 39
item08 2 4 3 18 12 39
item09 12 14 5 6 2 39
item10 0 4 5 21 9 39
item11 5 4 3 17 10 39
item12 2 3 4 22 8 39
item13 7 6 13 12 1 39
item14 1 2 7 22 7 39
item15 0 8 7 16 8 39
item16 4 13 9 9 4 39
item17 3 10 9 14 3 39
item18 6 8 7 13 5 39
item19 1 2 11 17 8 39
item20 5 13 8 8 5 39
item21 1 1 14 16 7 39
item22 7 3 11 16 2 39
item23 12 9 9 7 2 39
item24 0 4 3 14 18 39
item25 0 1 3 14 21 39
item26 0 2 3 20 14 39
item27 0 4 3 23 9 39
item28 0 1 1 13 24 39
item29 0 2 1 16 20 39
item30 0 0 1 14 24 39
item31 2 8 6 17 6 39
item32 0 1 2 16 20 39
item33 0 2 2 16 19 39
item34 0 0 2 17 20 39
item35 0 3 5 23 8 39
item36 2 8 6 19 4 39
item37 2 8 9 17 3 39
item38 1 8 9 16 5 39
item39 1 6 4 24 4 39
item40 0 5 12 17 5 39
item41 3 8 11 12 5 39
item42 2 9 11 12 5 39
item43 3 8 12 11 5 39
item44 0 4 11 15 9 39
item45 2 8 5 22 2 39
item46 1 10 10 13 5 39
item47 2 7 9 15 6 39
item48 0 4 7 21 7 39
item49 0 8 9 20 2 39
item50 3 15 8 11 2 39
Total 127 289 336 778 420 1950
In [7]:
heatmap_items = px.density_heatmap(df_items, x="Scale", y="Item", marginal_x="histogram", title="", color_continuous_scale=px.colors.diverging.Portland)
heatmap_items.update_yaxes(categoryorder='category descending')
heatmap_items.show()

Subset of Frequency Counts for Categorical Survey Data¶

In [8]:
frequency_counts = trrDat.groupby(['v1', 'gender', 'age', 'fiveYears', 'languageSurvey', 'languageToday', 'languageYouth', 'languageFamily', 'languageYouthSchool', 'languageYouthCommunity', 'programElementary', 'programSecondary', 'teachingYears', 'teachingBoard', 'teachingContext'])['duration'].count().reset_index()
In [9]:
frequency_counts.describe(include=['object'])
Out[9]:
gender age fiveYears languageSurvey languageToday languageYouth languageFamily languageYouthSchool languageYouthCommunity programElementary programSecondary teachingYears teachingBoard teachingContext
count 39 39 39 39 39 39 39 39 39 39 39 39 39 39
unique 4 4 9 2 4 5 5 3 5 7 8 4 7 6
top Female 40-49 FI teacher English English and French French and English English French and English English French school French school 15 CSSD Early FI
freq 33 15 17 25 21 15 21 21 21 14 13 20 16 21
In [10]:
frequency_counts_program_1 = frequency_counts.replace(['Early FI, English language school with FSL'],'Early FI, FSL')
frequency_counts_program_2 = frequency_counts_program_1.replace(['English language school with FSL'],'FSL')
frequency_counts_program_3 = frequency_counts_program_2.replace(['English language school with FSL, Other'],'FSL, Other')
frequency_counts_program_4 = frequency_counts_program_3.replace(['FI and English language school with FSL'],'FI, FSL')  
frequency_counts_program_5 = frequency_counts_program_4.replace(['FI and French school'],'FI, French school')
frequency_counts_program_6 = frequency_counts_program_5.replace(['Early FI and French school'],'Early FI, French school')
frequency_counts_program_7 = frequency_counts_program_6.replace(['Late FI'],'FI')

Dataset Language and Sentiment¶

In [11]:
French_survey = trrDat.loc[lambda df: (df['languageSurvey']=='French')];
In [12]:
English_survey = trrDat.loc[lambda df: (df['languageSurvey']=='English')];
In [13]:
df_short_to_long_French_survey = pd.melt(French_survey, id_vars =['v1'], value_vars =(trrDat.loc[:, "item01" : "item50"]), var_name='Item', value_name='Scale')
df_ascending_French_survey = df_short_to_long_French_survey.sort_values(['v1','Item'])
df_items_French_survey = df_ascending_French_survey.rename(columns={'v1': 'Participant'})
In [14]:
df_short_to_long_English_survey = pd.melt(English_survey, id_vars =['v1'], value_vars =(trrDat.loc[:, "item01" : "item50"]), var_name='Item', value_name='Scale')
df_ascending_English_survey = df_short_to_long_English_survey.sort_values(['v1','Item'])
df_items_English_survey = df_ascending_English_survey.rename(columns={'v1': 'Participant'})
In [15]:
df_scores_English_survey = df_items_English_survey['Scale']
df_scores_English_survey.value_counts()
Out[15]:
4    556
5    221
2    197
3    187
1     89
Name: Scale, dtype: int64
In [16]:
df_scores_French_survey = df_items_French_survey['Scale']
df_scores_French_survey.value_counts()
Out[16]:
4    222
5    199
3    149
2     92
1     38
Name: Scale, dtype: int64
In [17]:
language_item = ["English", "French", "English", "French", "English", "French"]
sentiment_item = ["Positive", "Positive", "Negative", "Negative", "Neutral", "Neutral"]
values_item = [777, 421, 286, 130, 187, 149]
language__item_sunburst = pd.DataFrame(dict(language_item=language_item, sentiment_item=sentiment_item, values_item=values_item))
print(language__item_sunburst)
language__item_sunburst = px.sunburst(language__item_sunburst, path=['language_item', 'sentiment_item'], values='values_item', color_discrete_sequence=px.colors.diverging.Portland, title='Teacher Interview Language and Code Sentiment')
language__item_sunburst.update_traces(textinfo="label+percent parent") 
language__item_sunburst.update_layout(autosize=False, height=500, width=500)
language__item_sunburst.show()
  language_item sentiment_item  values_item
0       English       Positive          777
1        French       Positive          421
2       English       Negative          286
3        French       Negative          130
4       English        Neutral          187
5        French        Neutral          149
In [18]:
language_interview = ["English", "French", "English", "French", "English", "French"]
sentiment_interview = ["Positive", "Positive", "Negative", "Negative", "Both", "Both"]
values_interview = [73, 33, 83, 38, 38, 18]
language__interview_sunburst = pd.DataFrame(dict(language_interview=language_interview, sentiment_interview=sentiment_interview, values_interview=values_interview))
print(language__interview_sunburst)
language__interview_sunburst = px.sunburst(language__interview_sunburst, path=['language_interview', 'sentiment_interview'], values='values_interview', color_discrete_sequence=px.colors.diverging.Portland, title='Teacher Interview Language and Code Sentiment')
language__interview_sunburst.update_traces(textinfo="label+percent parent") 
language__interview_sunburst.update_layout(autosize=False, height=500, width=500)
language__interview_sunburst.show()
  language_interview sentiment_interview  values_interview
0            English            Positive                73
1             French            Positive                33
2            English            Negative                83
3             French            Negative                38
4            English                Both                38
5             French                Both                18
In [19]:
language_switching = ["English to French", "French to English", "English to French", "French to English"]
sentiment_switching = ["Positive (5)", "Positive (3)", "Negative (6)", "Negative (11)"]
values_switching = [5, 3, 6, 11]
language_sunburst_switching = pd.DataFrame(dict(language_switching=language_switching, sentiment_switching=sentiment_switching, values_switching=values_switching))
print(language_sunburst_switching)
language_sunburst_switching = px.sunburst(language_sunburst_switching, path=['language_switching', 'sentiment_switching'], values='values_switching', color_discrete_sequence=px.colors.diverging.Portland, title='Teacher Interview Codeswitching Sentiment')
language_sunburst_switching.update_traces(textinfo="label+percent parent")
language_sunburst_switching.update_layout(autosize=False, height=500, width=500)
language_sunburst_switching.show()
  language_switching sentiment_switching  values_switching
0  English to French        Positive (5)                 5
1  French to English        Positive (3)                 3
2  English to French        Negative (6)                 6
3  French to English       Negative (11)                11

Teacher-Participants¶

In [20]:
teaching_sunburst = px.sunburst(frequency_counts, path=['teachingBoard', 'teachingContext'], color_discrete_sequence=px.colors.diverging.Portland, title='School Board and Teaching Context')
teaching_sunburst.update_traces(textinfo="label+percent parent")
teaching_sunburst.update_layout(autosize=False, height=800)
In [21]:
teaching_heatmap = px.density_heatmap(frequency_counts, x="teachingBoard", y="teachingContext", marginal_x="histogram", marginal_y="histogram",
                                    title="Frequency Counts for School Board and Teaching Context",
                                    labels={"teachingBoard": "School Board", "teachingContext": "Teaching Context"},
                                    text_auto=True, color_continuous_scale=px.colors.diverging.Portland)
teaching_heatmap.update_xaxes(categoryorder='array', categoryarray= ["CBE","CSSD","ECSD", "ESD", "RDPSD", "RVS", "Prefer not to say"])
teaching_heatmap.update_yaxes(categoryorder='array', categoryarray= ["Early FI", "Early FI and Intensive French", "Early FI and Late FI", "Early FI and FSL", "Intensive French", "FSL"])
teaching_heatmap.show()
In [22]:
program_heatmap = px.density_heatmap(frequency_counts_program_6, x="programElementary", y="programSecondary", marginal_x="histogram", marginal_y="histogram",
                                    title="Frenquency Counts for Programs Attended",
                                    labels={"programElementary": "Elementary Program(s) Attended", "programSecondary": "Secondary Program(s) Attended in Youth"},
                                    text_auto=True, color_continuous_scale=px.colors.diverging.Portland)
program_heatmap.update_xaxes(categoryorder='array', categoryarray= ['Other', 'FSL, Other', 'FSL', 'Early FI, FSL', 'Early FI', 'Early FI, French school', 'French school'])
program_heatmap.update_yaxes(categoryorder='array', categoryarray= ['Other', 'FSL, Other', 'FSL', 'FI, FSL', 'Late FI', 'FI', 'FI, French school', 'French school'])
program_heatmap.show()
In [23]:
languageYouth_languageToday_heatmap = px.density_heatmap(frequency_counts, x="languageYouth", y="languageToday", marginal_x="histogram", marginal_y="histogram",
                                    title="Frenquency Counts for Language(s) Used Most in Youth at Home and Today",
                                    text_auto=True,
                                    labels={"languageYouth": "Language(s) Used Most in Youth at Home", "languageToday": "Language(s) Used Most Today"},
                                    color_continuous_scale=px.colors.diverging.Portland)
languageYouth_languageToday_heatmap.update_xaxes(categoryorder='array', categoryarray= ['Other', 'English, Other', 'English', 'French and English', 'French'])
languageYouth_languageToday_heatmap.update_yaxes(categoryorder='array', categoryarray= ['Other', 'English', 'English and French', 'French'])
languageYouth_languageToday_heatmap.show()
In [24]:
frequency_counts_age_teachingYears = frequency_counts.replace(['15'],'Over 15')
age_teachingYears_heatmap = px.density_heatmap(frequency_counts_age_teachingYears, x="age", y="teachingYears", marginal_x="histogram", marginal_y="histogram", title="Teachers' Age by Number of Years Teaching", 
                        text_auto=True, color_continuous_scale=px.colors.diverging.Portland, labels={"age": "Age", "teachingYears": "Years Teaching"})
age_teachingYears_heatmap.update_xaxes(categoryorder='category ascending')
age_teachingYears_heatmap.update_yaxes(categoryorder='array', categoryarray= ["1-3","4-10","11-15", "Over 15"])
age_teachingYears_heatmap.show()

Professional Identity: Occupational Commitment¶

In [25]:
frequency_counts_fiveYears_1 = frequency_counts.replace(['Educational leader','School principal'],'Education admin')
frequency_counts_fiveYears_2 = frequency_counts_fiveYears_1.replace(['FI teacher','FSL teacher'],'Teacher of FSL')
fiveYears_pie = px.pie(frequency_counts_fiveYears_2, values='duration', names='fiveYears', color_discrete_sequence=px.colors.diverging.Portland, title='Dans 5 ans, vous travaillerez ... <br>In 5 years from now you will work as ...',
                       labels={"duration": "Count", "fiveYears": "Role in 5 years", "Teacher of FSL": "Teacher of FSL (23)", "Education admin": "Education admin (8)", "Retirement": "Retirement (4)", "Job unrelated to education": "Job unrelated to education (2)", "Teacher (another subject)": "Teacher another subject (1)", "Unsure": "Unsure (1)"})
fiveYears_pie.update_layout(autosize=False, height=500)
fiveYears_pie.update_traces(textinfo='percent+value')
fiveYears_pie.show()
In [26]:
frequency_counts_commitment = frequency_counts.drop(columns=['teachingBoard', 'duration', 'gender'])
participantsfiveYearsContext = frequency_counts_commitment.loc[lambda df: (df['fiveYears'] == 'Unsure') |(df['fiveYears'] == 'Job unrelated to education') |(df['fiveYears'] == 'Teacher (another subject)') ];
participantsfiveYearsContext
Out[26]:
v1 age fiveYears languageSurvey languageToday languageYouth languageFamily languageYouthSchool languageYouthCommunity programElementary programSecondary teachingYears teachingContext
4 5 40-49 Teacher (another subject) English English English English French and English English English language school with FSL Late FI 4-10 FSL
23 32 50-59 Job unrelated to education French French French French French English French school French school 15 Early FI
27 37 20-29 Unsure English English English French and English French French and English French school French school 1-3 Intensive French
29 40 30-39 Job unrelated to education English English and French French and English English French and English French and English Other English language school with FSL, Other 4-10 Early FI

Professional Identity: Job Satisfaction¶

In [27]:
df_short_to_long_satisfaction = pd.melt(trrDat, id_vars =['v1'], value_vars =(trrDat.loc[:, "item14" : "item23"]), var_name='Item', value_name='Scale')
df_ascending_satisfaction = df_short_to_long_satisfaction.sort_values(['v1','Item'])
df_items_satisfaction = df_ascending_satisfaction.rename(columns={'v1': 'Participant'})
In [28]:
heatmap_items_satisfaction = px.density_heatmap(df_items_satisfaction, x="Scale", y="Item", marginal_x="histogram",
                                    text_auto=True, title="", color_continuous_scale=px.colors.diverging.Portland)
heatmap_items_satisfaction.update_yaxes(categoryorder='category descending')
heatmap_items_satisfaction.show()

Cronbach Alpha for Satisfaction Subscale¶

In [29]:
items_satisfaction = trrDat.loc[:, 'item14':'item23']
In [30]:
pg.cronbach_alpha(data=items_satisfaction)
Out[30]:
(0.8363858363858364, array([0.748, 0.903]))

Spearman Correlations for Satisfaction Subscale¶

In [31]:
satisfaction_correlations = items_satisfaction.corr(method='spearman').round(2)
In [32]:
satisfaction_corr = satisfaction_correlations.where(np.tril(np.ones(satisfaction_correlations.shape)).astype(bool))
satisfaction_fig = go.Figure()
satisfaction_fig.add_trace(go.Heatmap(x = satisfaction_corr.columns, y = satisfaction_corr.index, z = np.array(satisfaction_corr), colorscale='Portland'))
satisfaction_fig.update_xaxes(showgrid=False)
satisfaction_fig.update_yaxes(showgrid=False)
satisfaction_fig.update_xaxes(categoryorder='category ascending')
satisfaction_fig.update_yaxes(categoryorder='category descending')
satisfaction_fig.update_layout(template='simple_white')
satisfaction_fig.show()
In [33]:
corr = pg.pairwise_corr(data=items_satisfaction, method='spearman').round(3)
corr.sort_values(by=['p-unc'])[['X', 'Y', 'n', 'r', "CI95%", 'p-unc', 'power']].head()
Out[33]:
X Y n r CI95% p-unc power
44 item22 item23 39 0.728 [0.53, 0.85] 0.000 1.000
38 item19 item23 39 0.575 [0.32, 0.75] 0.000 0.978
20 item16 item20 39 0.671 [0.45, 0.81] 0.000 0.998
17 item16 item17 39 0.572 [0.31, 0.75] 0.000 0.977
39 item20 item21 39 0.495 [0.21, 0.7] 0.001 0.908

Professional Identity: Linguistic Security¶

In [34]:
frequency_counts_bars = trrDat.groupby(['item14', 'item16', 'item20', 'item28', 'item29', 'item33', 'item42', 'item43', 'item47','v1', 'gender', 'age', 'fiveYears', 'languageSurvey', 'languageToday', 'languageYouth', 'languageFamily', 'languageYouthSchool', 'languageYouthCommunity', 'programElementary', 'programSecondary', 'teachingYears', 'teachingBoard', 'teachingContext'])['duration'].count().reset_index()



Item 16¶

Participation aux communautés & aux événements de / en langue française

Participation in French-speaking communities & events

In [35]:
trrDat.loc[:, 'item16'].median()
Out[35]:
3.0
In [36]:
px.bar(frequency_counts_bars, x="item16", y="duration", color_discrete_sequence=px.colors.diverging.Portland, labels={"duration": "counts"},
       hover_data=["languageYouth", "languageYouthCommunity", "programSecondary", "languageToday", "teachingContext", "teachingYears", "fiveYears"])
In [37]:
profile_lang_participation = px.parallel_categories(trrDat_program_9, 
        dimensions=['languageYouth', 'languageYouthCommunity','programSecondary', 'languageToday'],
                color="item16", title="Teacher Language Experience by Satisfaction Participation in French-speaking Communities",
                labels={"item16": "Item 16", "languageYouth": "Language Youth Home", "languageYouthCommunity": "Language Youth Community", "programSecondary": "Secondary Program Attended","languageToday": "Language Used Today"},
                color_continuous_scale=px.colors.diverging.Portland)
profile_lang_participation.show()
In [38]:
box_item16_1 = px.box(trrDat_program_9, x="languageYouth", y="item16", color="languageYouth", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouthCommunity","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 16: Satisfaction Participation French-speaking communities by Language Spoken during Youth at Home')
box_item16_1.update_layout(showlegend=False)
box_item16_1.show()
In [39]:
box_item16_2 = px.box(trrDat_program_9, x="languageYouthCommunity", y="item16", color="languageYouthCommunity", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouth","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 16 Satisfaction Participation by Language(s) Spoken in Youth in the Community')
box_item16_2.update_layout(showlegend=False)
box_item16_2.show()
In [40]:
box_item16_3 = px.box(trrDat_program_9, x="programSecondary", y="item16", color="programSecondary", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["teachingContext","languageYouth","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 16: Satisfaction Participation French-speaking Communities by Secondary Program Attended')
box_item16_3.update_layout(showlegend=False)
box_item16_3.show()

Item 20 Current Teaching Belonging French-speaking Communities¶

Sentiment d'appartenance aux communautés de langue française

Sense of belonging to French-speaking communities

In [41]:
trrDat.loc[:, 'item20'].median()
Out[41]:
3.0
In [42]:
px.bar(frequency_counts_bars, x="item20", y="duration", color_discrete_sequence=px.colors.diverging.Portland, labels={"duration": "counts"},
       hover_data=["languageYouth", "languageYouthCommunity", "programSecondary", "languageToday", "teachingContext", "teachingYears", "fiveYears"])
In [43]:
profile_lang_belonging = px.parallel_categories(trrDat_program_9, 
        dimensions=['languageYouth', 'languageYouthCommunity', 'programSecondary', 'languageToday'],
                color="item20",
                title="Teacher Language Experience by Sense of Belonging to French-speaking Communities",
                labels={"item16": "Item 16", "languageYouth": "Language Youth Home", "languageYouthCommunity": "Language Youth Community", "programSecondary": "Secondary Program Attended","languageToday": "Language Used Today"},
                color_continuous_scale=px.colors.diverging.Portland)
profile_lang_belonging.show()
In [44]:
box_item16_1 = px.box(trrDat_program_9, x="languageYouth", y="item20", color="languageYouth", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouthCommunity","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 16: Satisfaction Belonging French-speaking communities by Language Spoken during Youth at Home')
box_item16_1.update_layout(showlegend=False)
box_item16_1.show()
In [45]:
box_item16_2 = px.box(trrDat_program_9, x="languageYouthCommunity", y="item20", color="languageYouthCommunity", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouth","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 16 Satisfaction Belonging by Language(s) Spoken in Youth in the Community')
box_item16_2.update_layout(showlegend=False)
box_item16_2.show()
In [46]:
box_item16_3 = px.box(trrDat_program_9, x="programSecondary", y="item20", color="programSecondary", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["teachingContext","languageYouth","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 16: Satisfaction Belonging French-speaking Communities by Secondary Program Attended')
box_item16_3.update_layout(showlegend=False)
box_item16_3.show()
In [47]:
program_heatmap = px.density_heatmap(frequency_counts_program_7, x="languageYouthCommunity", y="programSecondary", marginal_x="histogram", marginal_y="histogram",
                                    title="Language(s) Used Most in Youth in the Community by Secondary Program Attended",
                                    labels={"languageYouthCommunity": "Language(s) Used Most in Youth in Community", "programSecondary": "Secondary Program(s) Attended"},
                                    text_auto=True, color_continuous_scale=px.colors.diverging.Portland)
program_heatmap.update_yaxes(categoryorder='array', categoryarray= ['Other', 'FSL, Other', 'FSL', 'FI, FSL', 'FI', 'FI, French school', 'French school'])
program_heatmap.show()

Professional Identity: Self-efficacy¶

Item 28 Current Teaching Competence French Oral Skills¶

In [48]:
trrDat.loc[:, 'item28'].median()
Out[48]:
5.0
In [49]:
px.bar(frequency_counts_bars, x="item28", y="duration", color_discrete_sequence=px.colors.diverging.Portland, labels={"duration": "counts"},
       hover_data=["languageYouth", "languageYouthCommunity", "programSecondary", "languageToday", "teachingContext", "teachingYears", "fiveYears"])

Item 29 Current Teaching Competence French Written Skills¶

In [50]:
trrDat.loc[:, 'item29'].median()
Out[50]:
5.0
In [51]:
px.bar(frequency_counts_bars, x="item29", y="duration", color_discrete_sequence=px.colors.diverging.Portland, labels={"duration": "counts"},
       hover_data=["languageYouth", "languageYouthCommunity", "programSecondary", "languageToday", "teachingContext", "teachingYears", "fiveYears"])

Item 33 Current Teaching Competence French Pedagogy¶

In [52]:
trrDat.loc[:, 'item33'].median()
Out[52]:
4.0
In [53]:
px.bar(frequency_counts_bars, x="item33", y="duration", color_discrete_sequence=px.colors.diverging.Portland, labels={"duration": "counts"},
       hover_data=["languageYouth", "languageYouthCommunity", "programSecondary", "languageToday", "teachingContext", "teachingYears", "fiveYears"])

Item 42 Current Teaching Confidence French Oral Skills¶

In [54]:
trrDat.loc[:, 'item42'].median()
Out[54]:
3.0
In [55]:
px.bar(frequency_counts_bars, x="item42", y="duration", color_discrete_sequence=px.colors.diverging.Portland, labels={"duration": "counts"},
       hover_data=["languageYouth", "languageYouthCommunity", "programSecondary", "languageToday", "teachingContext", "teachingYears", "fiveYears"])

Item 42 Current Teaching Confidence French Written Skills¶

In [56]:
trrDat.loc[:, 'item42'].median()
Out[56]:
3.0
In [57]:
px.bar(frequency_counts_bars, x="item42", y="duration", color_discrete_sequence=px.colors.diverging.Portland, labels={"duration": "counts"},
       hover_data=["languageYouth", "languageYouthCommunity", "programSecondary", "languageToday", "teachingContext", "teachingYears", "fiveYears"])

Item 47 Current Teaching Confidence French Pedagogy¶

In [58]:
trrDat.loc[:, 'item47'].median()
Out[58]:
4.0
In [59]:
px.bar(frequency_counts_bars, x="item47", y="duration", color_discrete_sequence=px.colors.diverging.Portland, labels={"duration": "counts"},
       hover_data=["languageYouth", "languageYouthCommunity", "programSecondary", "languageToday", "teachingContext", "teachingYears", "fiveYears"])

Satisfaction, Competence, and Confidence¶

In [60]:
items_satcompcon = trrDat.iloc[:, [14, 16, 20, 28, 29, 33, 42, 43, 47]]
In [61]:
pg.cronbach_alpha(data=items_satcompcon)
Out[61]:
(0.8302216814327541, array([0.737, 0.9  ]))
In [62]:
satcompcon_correlations = items_satcompcon.corr(method='spearman').round(2)
In [63]:
satcompcon_corr = satcompcon_correlations.where(np.tril(np.ones(satcompcon_correlations.shape)).astype(bool))
satcompcon_fig = go.Figure()
satcompcon_fig.add_trace(go.Heatmap(x = satcompcon_corr.columns, y = satcompcon_corr.index, z = np.array(satcompcon_corr), colorscale='Portland'))
satcompcon_fig.update_xaxes(showgrid=False)
satcompcon_fig.update_yaxes(showgrid=False)
satcompcon_fig.update_xaxes(categoryorder='category ascending')
satcompcon_fig.update_yaxes(categoryorder='category descending')
satcompcon_fig.update_layout(template='simple_white')
satcompcon_fig.show()
In [64]:
corr_satcompcon = pg.pairwise_corr(data=items_satcompcon, method='spearman').round(2)
corr_satcompcon.sort_values(by=['p-unc'])[['X', 'Y', 'n', 'r', "CI95%", 'p-unc', 'power']]
Out[64]:
X Y n r CI95% p-unc power
1224 item49 item50 39 0.597 [0.35, 0.77] 0.000 0.986
1133 item36 item50 39 0.567 [0.31, 0.75] 0.000 0.974
1134 item37 item38 39 0.664 [0.44, 0.81] 0.000 0.998
1137 item37 item41 39 0.543 [0.27, 0.73] 0.000 0.958
759 item19 item50 39 0.655 [0.43, 0.8] 0.000 0.997
... ... ... ... ... ... ... ...
1049 item31 item46 39 0.001 [-0.32, 0.32] 0.997 0.050
742 item19 item33 39 -0.001 [-0.32, 0.32] 0.997 0.050
102 item03 item09 39 -0.000 [-0.32, 0.32] 0.998 0.050
855 item23 item32 39 0.000 [-0.32, 0.32] 1.000 0.050
754 item19 item45 39 0.000 [-0.32, 0.32] 1.000 0.050

1225 rows × 7 columns

In [65]:
confidence_French_oral_Youth_Home = px.box(trrDat, x="languageYouth", y="item42", color="languageYouth", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouth","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 42 Confidence French Oral Skills (Median = 3)<br>by Language(s) Used Most in Youth at Home')
confidence_French_oral_Youth_Home.update_layout(showlegend=False)
confidence_French_oral_Youth_Home.show()
In [66]:
confidence_French_oral_Youth_Community = px.box(trrDat, x="languageYouthCommunity", y="item42", color="languageYouthCommunity", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouth","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 42 Confidence French Oral Skills (Median = 3)<br>by Language(s) Used Most in Youth in the Community')
confidence_French_oral_Youth_Community.update_layout(showlegend=False)
confidence_French_oral_Youth_Community.show()
In [67]:
confidence_French_oral_Program_Secondary = px.box(trrDat_program_7, x="programSecondary", y="item42", color="programSecondary", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouth","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 42 Confidence French Oral Skills (Median = 3)<br>by Secondary Program Attended')
confidence_French_oral_Program_Secondary.update_layout(showlegend=False)
confidence_French_oral_Program_Secondary.show()
In [68]:
confidence_French_oral_Today = px.box(trrDat, x="languageToday", y="item42", color="languageToday", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouth","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 42 Confidence French Oral Skills (Median = 3)<br>by Language(s) Used Most Today')
confidence_French_oral_Today.update_layout(showlegend=False)
confidence_French_oral_Today.show()
In [69]:
confidence_French_written_Youth_Home = px.box(trrDat, x="languageYouth", y="item43", color="languageYouth", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouth","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 43 Confidence French Written Skills (Median = 3)<br>by Language(s) Used Most in Youth at Home')
confidence_French_written_Youth_Home.update_layout(showlegend=False)
confidence_French_written_Youth_Home.show()
In [70]:
confidence_French_written_Youth_Community = px.box(trrDat, x="languageYouthCommunity", y="item43", color="languageYouthCommunity", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouth","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 43 Confidence French Written Skills (Median = 3)<br>by Language(s) Used Most in Youth in the Community')
confidence_French_written_Youth_Community.update_layout(showlegend=False)
confidence_French_written_Youth_Community.show()
In [71]:
confidence_French_written_Program_Secondary = px.box(trrDat_program_7, x="programSecondary", y="item43", color="programSecondary", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouth","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 43 Confidence French Written Skills (Median = 3)<br>by Secondary Program Attended')
confidence_French_written_Program_Secondary.update_layout(showlegend=False)
confidence_French_written_Program_Secondary.show()
In [72]:
confidence_French_written_Today = px.box(trrDat, x="languageToday", y="item43", color="languageToday", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouth","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 43 Confidence French Written Skills (Median = 3)<br>by Language(s) Used Most Today')
confidence_French_written_Today.update_layout(showlegend=False)
confidence_French_written_Today.show()
In [73]:
confidence_French_written_Program_Secondary = px.box(trrDat, x="languageYouth", y="item47", color="languageYouth", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouth","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 47 Confidence French Pedagogy (Median = 4)<br>by Language(s) Used Most in Youth at Home')
confidence_French_written_Program_Secondary.update_layout(showlegend=False)
confidence_French_written_Program_Secondary.show()
In [74]:
confidence_French_pedagogy_Youth_Community = px.box(trrDat, x="languageYouthCommunity", y="item47", color="languageYouthCommunity", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouth","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 47 Confidence French Pedagogy (Median = 4)<br>by Language(s) Used Most in Youth in the Community')
confidence_French_pedagogy_Youth_Community.update_layout(showlegend=False)
confidence_French_pedagogy_Youth_Community.show()
In [75]:
confidence_French_pedagogy_program = px.box(trrDat_program_7, x="programSecondary", y="item47", color="programSecondary", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouth","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 47 Confidence French Pedagogy (Median = 4)<br>by Secondary Program Attended')
confidence_French_pedagogy_program.update_layout(showlegend=False)
confidence_French_pedagogy_program.show()
In [76]:
confidence_French_pedagogy_Today = px.box(trrDat, x="languageToday", y="item47", color="languageToday", points="all", color_discrete_sequence=px.colors.diverging.Portland,
                    hover_data=["languageYouth","programSecondary","teachingContext","teachingYears","fiveYears"],
                    labels={"languageYouth": "Language(s) Used Most Youth at Home", "languageYouthCommunity": "Language(s) Used Most Youth in Community", "programSecondary": "Secondary Program Attended", "languageToday": "Language(s) Used Most Today", "teachingContext": "Current Teacing Context", "teachingYears": "Years Teaching", "fiveYears":"Role 5 Years"},
                    title='Item 47 Confidence French Pedagogy (Median = 4)<br>by Language(s) Used Most Today')
confidence_French_pedagogy_Today.update_layout(showlegend=False)
confidence_French_pedagogy_Today.show()

La fin¶